﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 字典类型与字典值构造的树
/// </summary>
public partial class DictTreeOutput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 父Id
    /// </summary>
    [DisplayName("父Id")]
    [JsonPropertyName("pid")]
    public long Pid { get; set; }

    /// <summary>
    /// 编码-对应字典值的编码
    /// </summary>
    [DisplayName("编码-对应字典值的编码")]
    [JsonPropertyName("code")]
    public string? Code { get; set; }

    /// <summary>
    /// 名称-对应字典值的value
    /// </summary>
    [DisplayName("名称-对应字典值的value")]
    [JsonPropertyName("name")]
    public string? Name { get; set; }

    /// <summary>
    /// 子节点集合
    /// </summary>
    [DisplayName("子节点集合")]
    [JsonPropertyName("children")]
    public ICollection<DictTreeOutput>? Children { get; set; }

}
